/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.web.servlet;

import com.web.daoimpl.StudentDaoImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author liqianru
 */
@WebServlet("/modifyStu")
public class Admin_modifyStu extends HttpServlet {

    StudentDaoImpl service=new StudentDaoImpl();
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String sid = req.getParameter("id");
        String sname = req.getParameter("sname");
        String spwd = req.getParameter("spwd");
        String sgender = req.getParameter("sgender");
        String classid = req.getParameter("classid");
        System.out.println(spwd+sname+classid+"=="+sid);
        //
        int  row=service.updateStudent(sid, sname, spwd);
        System.out.println(row);
        resp.getWriter().print(row);
    }

}
